package classes
{
	import components.c_component;

	public class c_historyItem extends Object {
		private var _states: Array;
		public function c_historyItem() {
			super();
			_states = new Array();
		}
		
		public function addState(a_component: c_component, a_state: Object): void {
			_states.push({
				component	: a_component,
				state		: a_state
			});
		}
		
		public function get states(): Array {
			return _states;
		}
		
		public function removeComponents(): void {
			_states.forEach(function(item: Object,i: int, arr: Array): void {
				item.component.removeFromHistory(item.state);
			});
		}
	}
}